<div class="tableToolbar">
	<div class="coll-md-9" id="addInput">
		<div class="coll-md-1">
			<input type="text" class='search' placeholder="项目名称" ng-model="ctrlScope.itemsearch.itemName">
		</div>
		<div class="coll-md-15">
			<input type="text" class='search' placeholder="用户名/真实姓名" ng-model="ctrlScope.itemsearch.name">
		</div>

		<div class="coll-md-3 scalenone"  id="searchdate" datahide>
			<div class="coll-md-5" >
				<p class="input-group">
					<input type="text" class="search" placeholder="开始时间" uib-datepicker-popup="yyyy-MM-dd"
						   ng-model="ctrlScope.itemsearch.beginDateTimex" is-open="popup1.opened" datepicker-options="dateOptions"
						   ng-minlength="1" />
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open1()"><i
												class="glyphicon glyphicon-calendar"></i></button>
							          </span>
				</p>
			</div>
			<div class="coll-md-5">
				<p class="input-group inline">
					<input type="text" class="search" placeholder="结束时间" uib-datepicker-popup="yyyy-MM-dd"
						   ng-model="ctrlScope.itemsearch.endDateTimex" is-open="popup2.opened" datepicker-options="dateOptions"
						   ng-minlength="1" />
						<span class="input-group-btn">
							            <button type="button" class="small-icon btn btn-default" ng-click="open2()"><i
												class="glyphicon glyphicon-calendar"></i></button>
							          </span>
				</p>
			</div>
		</div>
		<div class="coll-md-1">
			<input type="button" class="small-icon search2-icon" value="搜索" ng-click="search()">
			<input type="button" class="small-icon search2" value="搜索">
			<input type="button" class="small-icon reset-icon" reset-icon value="重置" ng-click="reset()">
			<input type="button" class="small-icon reset" value="重置">

			<div class="dropdown-menu-right">
				<input type="button" class="small-icon more-icon" value="更多" title='更多搜索项' id="more-icon" data-toggle="dropdown"
					   aria-haspopup="true" aria-expanded="false">
				<input type="button" class="small-icon more" value="更多">
				<ul class="dropdown-menu" style='margin-left:80px;' aria-labelledby="dropdownMenu2" more-search>
					<li><a href="javascript:;">日期搜索</a></li>
					<!--<li><a href="javascript:;">其他条件搜索</a></li>-->
				</ul>
			</div>
		</div>
	</div>
	<div class="coll-md-1">
		<!--<button class="small-icon btn btn-default pos-right"  ng-click="download()">-->
			<!--<i class="fa fa-download"></i>-->
		<!--</button>-->
	</div>
</div>
<div style="width:100%;overflow-x: auto">
	<table ui-table="orderParams"   bordercolor="#eee" cellspacing="0px" style="border-collapse:collapse;">
		<thead>
		<tr>
			<th>id</th>
			<th>项目名称</th>
			<th>发布人手机号码</th>
			<th>真实姓名</th>
			<th>类型</th>
			<th>金额</th>
			<th>进行中的金额</th>
			<th>状态</th>
			<th>有效天数</th>
			<th>添加时间</th>
			<th>操作</th>
		</tr>
		</thead>
		<tbody>

		<tr ng-repeat="item in orderParams.$rows" style="text-align: left">
			<td>{{item.id}}</td>
			<td>{{item.itemName}}</td>
			<td>{{item.mobile}}</td>
			<td>{{item.realname}}</td>
			<td>
				<div ng-if="item.type==1">个人发布</div>
				<div ng-if="item.type==2">企业发布</div>
			</td>
			<td>{{item.amount}} </td>
			<td>{{item.ongoingAmount}}</td>
			<td>
				<div ng-if="item.status==0">未债权</div>
				<div ng-if="item.status==1">已债权</div>
				<div ng-if="item.status==2">已过期</div>
			</td>
			<td>{{item.endDays}}</td>
			<td>{{item.addtime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
			<td>
				<a ng-click="modifyModal(item.id)">查看</a>
			</td>
		</tr>
		</tbody>
	</table>
</div>
<modal title="查看" visible="showDiv">
	<form class="form-horizontal">
		<div class="form-body">
			<ul id="myTab1" class="nav nav-tabs">
				<li class="active"><a href="#item21" data-toggle="tab" ng-click="info()">债权基本信息</a></li>
				<li><a href="#item22" data-toggle="tab" ng-click="loan()">债权投资记录</a></li>
			</ul>
			<div id="myTabContent2" class="tab-content" style="margin-top:10px;">
				<div class="tab-pane fade in active" id="item21" >
					<div class="row">
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">项目名称</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="list.itemName" readonly>
								</div>
							</div>
						</div>
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">发布人手机号码</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="list.mobile" readonly>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">真实姓名</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="list.realname" readonly>
								</div>
							</div>
						</div>
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">类型</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="listStatus" readonly>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">金额</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="list.amount" readonly>
								</div>
							</div>
						</div>
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">进行中的金额</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="list.ongoingAmount" readonly>
								</div>
							</div>
						</div>
					</div>

					<div class="row">
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">状态</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="listType" readonly>
								</div>
							</div>
						</div>
						<div class="col-md-6">
							<div class="form-group">
								<label class="control-label col-md-4">有效天数</label>
								<div class="col-md-8">
									<input type="text" class="form-control" ng-model="list.endDays" readonly>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="tab-pane fade" id="item22" >
					<table ui-table="orderParams2">
						<thead>
						<tr>
							<th>债权名称</th>
							<th>投资人</th>

							<th>投资类型</th>
							<th>订单号</th>
							<th>状态</th>
							<th>投资金额</th>
							<th>添加时间</th>
						</tr>
						</thead>
						<tbody>
						<tr ng-repeat="item in orderParams2.$rows">
							<td>{{item.itemName}}</td>
							<td>{{item.investUserId}}</td>
							<td ng-if="item.investType==1">ios</td>
							<td ng-if="item.investType==2">安卓</td>
							<td>{{item.investOrder}}</td>
							<td ng-if="item.status==0">未债权</td>
							<td ng-if="item.status==1">已债权</td>
							<td ng-if="item.status==2">已过期</td>
							<td>{{item.investAmount}}</td>
							<td>{{item.addtime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
						</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</form>
</modal>